﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility;
using Utility.Models;
using Hxj.Data;
namespace JYJJ.Web.Pages
{
    public partial class zhengshu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ltDate.Text = DateTime.Now.Year.ToSafeString() + "年" + DateTime.Now.Month.ToSafeString() + "月" + DateTime.Now.Day.ToSafeString() + "日";
            string orderId = ParamsOfRequest.Request("orderId");
            string donateId = ParamsOfRequest.Request("donateId");
            model_Donate model = JYJJ.BLL.ServceHelper.ServiceDonate().GetDonateModel(donateId.ToSafeInt());
            model_Donate_Order model_Order = JYJJ.BLL.ServceHelper.ServiceDonate().GetDonateOrderModelByOrderID(orderId);
            if (model != null)
            {
                ltXMMC.Text = model.Title;
            }
            if (model_Order != null)
            {
                ltMoney.Text = model_Order.payMoney.ToSafeString();
                ltName.Text = model_Order.name;
                if (model_Order.Status == 0)
                {
                    string script = " alert('提示：您还未进行缴费，请先进行缴费');   window.location.href='payQR.aspx?orderId=" + orderId + "&donateId=" + donateId + "';";
                    HttpContext.Current.Response.Write("<script language=\"javascript\" type=\"text/javascript\" defer>\n" + script + "\n</script>\n");
                    HttpContext.Current.Response.End();
                }
            }
        }
    }
}